package com.wise.service.cms.content.productindustry.product;

import com.wise.summer.v1.cms.content.product.UpdateProductById;
import com.wise.summer.v1.cms.content.productindustry.UpdateProductIndustryById;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

/**
 * @author shaoming
 * @date 2019-09-09
 */
@Service
@SummerService
public class UpdateProductIndustryByIdService implements SummerServiceBean<UpdateProductIndustryById> {
    @Override
    public void sum(UpdateProductIndustryById summer) {
        UpdateProductById updateProductById = new UpdateProductById();
        BeanUtils.copyProperties(summer, updateProductById);
        updateProductById.setCategoryType(1);
        updateProductById.sum();
        summer.setSummerResult(updateProductById.getSummerResult());
    }
}
